package com.hitqz.robot.biz.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hitqz.robot.api.business.entity.RobotEntity;
import com.hitqz.robot.common.core.constant.CacheConstants;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface RobotService extends IService<RobotEntity> {

	List<Tree<Long>> selectTree();

	/**
	 * 根据机器人编码查询
	 * @param robotSn
	 * @return
	 */
	@Cacheable(cacheNames = "robot::client", key = "#robotSn", unless = "#result == null")
	RobotEntity selectByRobotSn(String robotSn);

}